{% extends "admin/base.html" %}

{% block main %}
	<div class='main'>
	{% if comments %}
	
		<!-- pagemarks start -->
		{% if pagemarks %}
		<div class='pagemarks'>
		{% for mark in pagemarks %}
		{% if mark.is_link %}
		<a href='{{ mark.url }}' class='{{ mark.css }}'>{{ mark.label }}</a>
		{% else %}
		<span class='{{ mark.css }}'>{{ mark.label }}</span>
		{% endif %}
		{% endfor %}
		</div>
		{% endif %}
		<!-- pagemarks end -->
		
		<table class='list'>
		{% for c in comments %}
		<tr class='{{ loop.cycle('alt','') }}'>
			<td>{{ c.createdate_dt|datetimeformat('%Y-%m-%d %H:%M') }}</td>
			<td>{{ c.author }}</td>
			<td><a href='/admin/comments/{{ c.id }}/'>{{ c.content|truncate(length=30, killwords=True, end='...') }}</a></td>			
		</tr>
		{% endfor %}
		</table>
		
		<!-- pagemarks start -->
		{% if pagemarks %}
		<div class='pagemarks'>
		{% for mark in pagemarks %}
		{% if mark.is_link %}
		<a href='{{ mark.url }}' class='{{ mark.css }}'>{{ mark.label }}</a>
		{% else %}
		<span class='{{ mark.css }}'>{{ mark.label }}</span>
		{% endif %}
		{% endfor %}
		</div>
		{% endif %}
		<!-- pagemarks end -->
		
	{% else %}
		<span class='notify'>没有评论。</span>
	{% endif %}
	</div>
{% endblock %}